<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xhtml xsl">
	<xsl:output method="html" media-type="text/xhtml" omit-xml-declaration="yes" 
	version="1.0" encoding="UTF-8" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" 
	doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" indent="yes"/>
	
	<xsl:include href="headData.xsl" />

			<xsl:template match="box1">
				<div id="backgroundMainBox">
					<div id="boxMain" class="boxTopLeft">
						<h1><xsl:value-of select="description"/></h1>
						<div id="bookMain" class="book">
						<xsl:comment>§§start</xsl:comment>
							<span id="{//box1/categories/@name}">
								<xsl:for-each select="//box1/categories/book">
									<xsl:choose>
										<xsl:when test="@hidden=1">
											<xsl:comment>§§start</xsl:comment><a href="__catImgLinkINDEXINDEX__">
											<img src="{img}" alt="{desc}" class="notInScreen" /></a><xsl:comment>§§end</xsl:comment>
										</xsl:when>
										<xsl:otherwise>
											<a href="__firstImgLinkINDEX__"><img src="{img}" alt="{desc}" /></a>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:for-each>
							</span>
						<xsl:comment>§§end</xsl:comment>
						<div class="boxFootRight"></div>
						</div>
					</div>
				</div>
						
			</xsl:template>

			<xsl:template match="box2">
				<div class="boxTopLeft box">
					<h2><xsl:value-of select="description"/></h2>
					<div class="book">
					<xsl:comment>§§start</xsl:comment><a href="__topImgLinkINDEX__"><img src="{//box2/book/img}" alt="{//box2/book/desc}" /></a><xsl:comment>§§end</xsl:comment>
					<div class="boxFootRight"></div>
					</div>
				</div>
			</xsl:template>

			<xsl:template match="box3">
				<div class="boxTopLeft box">
					<h2><xsl:value-of select="description"/></h2>
					<div class="book">
					<xsl:comment>§§start</xsl:comment><a href="__recImgLinkINDEX__"><img src="{//box3/book/img}" alt="{//box3/book/desc}" /></a><xsl:comment>§§end</xsl:comment>
					<div class="boxFootRight"></div>
					</div>
				</div>
			</xsl:template>
			
			<xsl:template match="welcome">
				<div id="description">
					<h1><xsl:value-of select="title"/></h1>
					<div>
					<xsl:apply-templates select="copy"/>
					</div>
				</div>
			</xsl:template>

			<xsl:template match="copy">
				<xsl:for-each select=".">
					<xsl:copy-of select="." />
				</xsl:for-each>
			</xsl:template>

	<xsl:template match="content">
		<div id="content">
			<xsl:apply-templates select="titleContent"/>
			<xsl:apply-templates select="welcome"/>
			<xsl:apply-templates select="box1"/>
			<xsl:apply-templates select="box2"/>
			<xsl:apply-templates select="box3"/>
			<xsl:apply-templates select="copy"/>
			<span id="endContent"></span>
		</div>
	</xsl:template>
	
</xsl:stylesheet>
